package com.huanzhidadi.canal.handler;

/*import com.huanzhidadi.canal.entity.User;
import org.springframework.stereotype.Component;
import top.javatool.canal.client.annotation.CanalTable;
import top.javatool.canal.client.handler.EntryHandler;

canal从mysql数据库中获取数据，对外提供tcp，SpringBoot通过@CanalTable(value = "xxx")注解对指定表进行监听
canal:
  server: 127.0.0.1:11111
  destination: example

@Component
@CanalTable(value = "user")
public class UserHandler implements EntryHandler<User> {

    @Override
    public void insert(User user) {
        System.out.println("添加：" + user);
    }

    @Override
    public void update(User before, User after) {
        System.out.println("改前：" + before);
        System.out.println("改后：" + after);
    }

    @Override
    public void delete(User user) {
        System.out.println("删除：" + user);
    }
}*/
